using System;
using System.Collections.Generic;
using System.Linq;

public class Repository<T>
{
    private List<T> items = new List<T>();

    public void Add(T item) => items.Add(item);

    public void Remove(T item) => items.Remove(item);

    public IEnumerable<T> GetAll() => items;
}

public class Product
{
    public string Name { get; set; }
    public decimal Price { get; set; }

    public Product(string name, decimal price)
    {
        Name = name;
        Price = price;
    }
}

class Program
{
    static void Main()
    {
        var repo = new Repository<Product>();
        
        repo.Add(new Product("Ноутбук", 50000));
        repo.Add(new Product("Мышка", 800));
        repo.Add(new Product("Смартфон", 15000));

        var expensiveProducts = repo.GetAll().Where(p => p.Price > 1000);

        Console.WriteLine("Товары дороже 1000 руб:");
        foreach (var product in expensiveProducts)
        {
            Console.WriteLine($"- {product.Name} ({product.Price} руб)");
        }
    }
}
